import turtle
#设置画布大小
turtle.setup(1000,800)
#创建画笔
pen = turtle.Pen()
#移动画笔
pen.penup()
pen.goto(-150,110)
pen.pendown()
#绘制红色背景
pen.color('red')
pen.begin_fill()
for _ in range(2):
    pen.forward(300)
    pen.right(90)
    pen.forward(220)
    pen.right(90)
pen.end_fill()
#移动画笔到绘制五角星起始位置绘制五角星
pen.penup()
pen.goto(-120,65)
pen.pendown()
pen.color('yellow')
pen.begin_fill()
for _ in range(5):
    pen.forward(40)
    pen.right(144)
pen.end_fill()
#移动画笔到绘制五角星起始位置
pen.penup()
pen.goto(-70,90)
pen.pendown()
pen.begin_fill()
for _ in range(5):
    pen.forward(20)
    pen.right(144)
pen.end_fill()
#移动画笔到绘制五角星起始位置
pen.penup()
pen.goto(-50,60)
pen.pendown()
pen.begin_fill()
for _ in range(5):
    pen.forward(20)
    pen.right(144)
pen.end_fill()
#移动画笔到绘制五角星起始位置
pen.penup()
pen.goto(-60,40)
pen.pendown()
pen.begin_fill()
for _ in range(5):
    pen.forward(20)
    pen.right(144)
pen.end_fill()
#移动画笔到绘制五角星起始位置
pen.penup()
pen.goto(-85,20)
pen.pendown()
pen.begin_fill()
for _ in range(5):
    pen.forward(20)
    pen.right(144)
pen.end_fill()
#隐藏画笔
pen.hideturtle()
#结束绘制
turtle.done()